<style>
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:3.6rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
.desc {
	font-size:0.65rem;
	padding:0.5rem 0.2rem;
	color:#999
}
.store-star .star .shine {
    color: #fa672d;
}
.weui_cells_text {padding:0 10px;padding-top:10px}
p {
    margin: 0 0 2px;
}
</style>
<div class="fui-page fui-page-current">
	<div class="fui-header">
        <div class="fui-header-left">
            <a class="back" ng-click="goback();"></a>
        </div>
        <div class="title">预约平台专员下店</div>
    </div>
	<div class='fui-content'>
	<div class="fui-list-group merchgroup" style="padding:0.3rem">
		<div class="weui_cells_title">预约日期</div>
		 <div class="fui-tab-scroll weui_cells_radio3" style="height: 3.2rem;overflow-y:hidden">
			<div ng-if="item.isshow==1" class="fui-icon-col" ng-repeat="item in pagedata.data" style="height: 3.2rem">
			    <label class="jyui_cell_col">
					<div ng-class="{'coltime':1,'colchecked':pagedata.post.dayid==$index}" ng-click="pagedata.post.dayid=$index;">
						<div class="timetitle"><span>{{item.riqi}}</span></div>
						<div class="timetitle"><span>{{item.xinq}}</span></div>
					</div>
				</label>
			</div>
		</div>
		<div ng-if="pagedata.worker_list.length>0" class="weui_cells_title">可预约的专员</div>
		<div ng-if="pagedata.worker_list.length>0" class="fui-tab-scroll" style="height:4.6rem" >
			<div class="xcontainer weui_cells_radio3" style="z-index:0;height: 4.6rem;padding:0.3rem" >
			    <label class="jyui_cell_member" style="width:3rem" ng-repeat="item1 in pagedata.worker_list">
					<div class="userimg" ng-click="pagedata.post.worker_id=item1.id;">
						<img class="img-circle"  ng-src="{{tomedia(item1.headimg) || '../core/resource/images/nopic.jpg'}}" style="width:3rem;height:3rem">
						<div class="imglogo-check" style="margin-left:2.2rem;margin-top:-1.8rem">
							<input type="radio" class="weui_check" name="radio2">
							<span class="weui_icon_checked"></span>
						</div>
					</div>
					<div>
						<span style="font-size:0.6rem">{{item1.name}}</span>
					</div>
				</label>
			</div>
		</div>
		</div>
		 <div class="weui_btn_area">
			 <a ng-if="pagedata.canbuy" class="weui_btn weui_btn_primary" href="javascript:"  ng-click="pagedata.check_buy()">立即预约</a>
			 <a ng-if="!pagedata.canbuy" class="weui_btn weui_btn_primary disabled" href="javascript:">立即预约</a>
		</div>
	</div>
</div>
<script type="text/javascript">
scope.pagedata.post.packageid = '0';
scope.pagedata.canbuy=true;
scope.pagedata.check_buy=function(){
	var worker_id=scope.pagedata.post.worker_id
	if(!worker_id && scope.pagedata.worker_list.length>0){
		scope.message('请选择专员！');
		return false;
	}
	var packageid=scope.pagedata.post.packageid
	var timeid=scope.pagedata.post.timeid
	var dayid=scope.pagedata.post.dayid
	scope.post_json('jy_area_dai/yuyue/post/',scope.pagedata.post,function(res){});
}
scope.worker_list = function(dayid){
		console.log(dayid);
		scope.pagedata.post.timeid='no'
		var params1 = {
					'plugin':'jy_area_dai',
					'action':'yuyue',
					'op':'worker_list',
					'query':'&day='+dayid,
					'data':{},
					'callback':function(data){
							console.log(data)
							if(data.success == 1){
									scope.pagedata.worker_list = data.worker_list;
									scope.$evalAsync();
							}
					}
		}
		scope.post_json(params1);
}
scope.worker_list(scope.pagedata.post.dayid);
</script>